#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
int main()
{
	int count1 = 0, count2 = 0;
	long arr[10000];
	int n;
	scanf("%d", &n);
	for (int i = 0; i < n; i++)
	{
		scanf("%ld", &arr[i]);

	}
	for (int i = 0; i < n; i++)
	{
		if (arr[i] >= 10 && arr[i] <= 20)
		{
			count1++;
		}
		else
			count2++;
	}

	printf("%d in\n", count1);
	printf("%d out\n", count2);


	return 0;
}